/*================================================================
*   Copyright (C) 2019 Guangzhou Firefly Ltd. All rights reserved.
*   
*   文件名称：led_alert.h
*   创 建 者：luhuadong
*   创建日期：2019年08月30日
*   描    述：
*
================================================================*/


#ifndef LED_ALERT_H
#define LED_ALERT_H

#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>

#define LED0_PIN       GET_PIN(A, 5)

#define EVENT_LED0_ON    (1 << 3)
#define EVENT_LED0_OFF   (1 << 5)
#define EVENT_LED0_BLINK (1 << 7)

/* 事件控制块 */
struct rt_event led_event;

int led_init();
void led_on(rt_base_t led_pin);
void led_off(rt_base_t led_pin);
void led_blink_time(rt_int32_t ms);
void led_blink(rt_base_t led_pin);

#endif

